package com.sykj.zhangzhenyu.controller;

import com.sykj.util.ResponseResult;
import com.sykj.zhangzhenyu.bean.CwInvoice;
import com.sykj.zhangzhenyu.service.CwInvoiceService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import sun.awt.SunHints;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 黄泉碧落
 * @date 2020/5/19 14:46
 * 个人发票
 */
@RestController
public class CwInvoiceController {
@Resource
    private CwInvoiceService cwInvoiceService;

    /**
     *
     * @param cwInvoice
     * @return 个人发票
     * 查看发票 综合查询
     */
    @GetMapping(value = "invoice/fp")
        public ResponseResult queryCwinvo(CwInvoice cwInvoice){
             List<CwInvoice>cwInvoiceList=cwInvoiceService.queryCwinvo(cwInvoice);

    if (cwInvoiceList==null){
        return  new ResponseResult(404,"查询失败",false,null);
    }

    return  new ResponseResult(200,"查询成功",true, cwInvoiceList);

}


}
